<template>
  <div class="research-container">
    <div class="research-header">
      <h1>研究与创新</h1>
      <div class="breadcrumb">
        <router-link to="/">首页</router-link> / 研究与创新
      </div>
    </div>
    
    <div class="research-nav">
      <router-link to="/research/intellectual-property" :class="{ active: $route.path === '/research/intellectual-property' }">
        知识产权
      </router-link>
      <router-link to="/research/research-carrier" :class="{ active: $route.path === '/research/research-carrier' }">
        科研载体
      </router-link>
      <router-link to="/research/awards" :class="{ active: $route.path === '/research/awards' }">
        荣誉奖项
      </router-link>
    </div>
    
    <div class="research-content">
      <router-view />
    </div>
  </div>
</template>

<script>
export default {
  name: 'Research',
  created() {
    // 如果访问的是父路由，默认重定向到第一个子路由
    if (this.$route.path === '/research') {
      this.$router.push('/research/intellectual-property');
    }
  }
}
</script>

<style scoped>
.research-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.research-header {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eaeaea;
}

.research-header h1 {
  font-size: 28px;
  color: #333;
  margin-bottom: 10px;
}

.breadcrumb {
  font-size: 14px;
  color: #666;
}

.breadcrumb a {
  color: #0056b3;
  text-decoration: none;
}

.research-nav {
  display: flex;
  margin-bottom: 30px;
  border-bottom: 2px solid #eaeaea;
}

.research-nav a {
  padding: 12px 24px;
  color: #555;
  text-decoration: none;
  font-size: 16px;
  position: relative;
  transition: all 0.3s;
}

.research-nav a:hover {
  color: #0056b3;
}

.research-nav a.active {
  color: #0056b3;
  font-weight: 500;
}

.research-nav a.active:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #0056b3;
}

.research-content {
  min-height: 500px;
}

@media (max-width: 768px) {
  .research-nav {
    flex-direction: column;
  }
  
  .research-nav a {
    padding: 10px 0;
  }
}
</style> 